CPPFLAGS = -Wall -Wextra -g #-O2 -std=c++0x
EXE = my_perf sys_perf my_sort sys_sort test1 test2 test3 test4 test5
all: $(EXE)

%.o : ../src/%.cpp
	g++ $(CPPFLAGS) -c $<

sys_sort: heapsort.cpp ../include/mm.h mm.o
	g++ $(CPPFLAGS) heapsort.cpp mm.o -o sys_sort

my_sort: heapsort.cpp ../include/mm.h mm.o
	g++ -DMYMEM $(CPPFLAGS) heapsort.cpp mm.o -o my_sort

sys_perf: perform.cpp ../include/mm.h mm.o
	g++ $(CPPFLAGS) perform.cpp -o sys_perf

my_perf: perform.cpp ../include/mm.h mm.o
	g++ -DMYMEM $(CPPFLAGS) perform.cpp mm.o -o my_perf

test1: test1.cpp ../include/mm.h mm.o
	g++ $(CPPFLAGS) test1.cpp mm.o -o test1

test2: test2.cpp ../include/mm.h mm.o
	g++ $(CPPFLAGS) test2.cpp mm.o -o test2

test3: test3.cpp ../include/mm.h mm.o
	g++ $(CPPFLAGS) test3.cpp mm.o -o test3

test4: test4.cpp ../include/mm.h mm.o
	g++ $(CPPFLAGS) test4.cpp mm.o -o test4

test5: test5.cpp ../include/mm.h mm.o
	g++ $(CPPFLAGS) test5.cpp mm.o -o test5

clean:
	rm -f *.o $(EXE)
